## 下载软件
wget https://ftp-trace.ncbi.nlm.nih.gov/sra/sdk/3.1.0/sratoolkit.3.1.0-centos_linux64.tar.gz
tar -xzvf sratoolkit.3.1.0-centos_linux64.tar.gz

export prefetch=~/20230331_colrNew/public_data/sratoolkit.3.1.0-centos_linux64/bin/prefetch
export fastq_dump=~/20230331_colrNew/public_data/sratoolkit.3.1.0-centos_linux64/bin/fastq-dump

## https://aacrjournals.org/clincancerres/article/21/19/4461/125136/Subclonal-Genomic-Architectures-of-Primary-and
## 5例结直肠癌患者的肝转移数据
export output_path=~/20230331_colrNew/public_data/liver
${prefetch} SRP052609 -O ${output_path}

mkdir ${output_path}/raw_fastq
cd ${output_path}/raw_fastq

for sra_file in `find ${output_path} | grep sra | grep -v vdbcache `
do
echo ${sra_file}
${fastq_dump} --split-3 ${sra_file}
done


## fastq文件压缩
for file in `ls | grep fastq | grep _ `
do
bgzip ${file}
done